Method of miving piece in a networked computer game

ABSTRACT

Provided is a method of moving piece in a networked computer game played between a server and a client wherein at the server a checkerboard coordinate of low resolution and a fine coordinate of high resolution is used, and an object in a virtual three-dimensional space is represented in the checkerboard coordinate; at a three-dimensional piece of the computer game, both the checkerboard coordinate and the fine coordinate are used wherein an approximate location and blocking determination of the piece are represented and recorded by the checkerboard coordinate; and at the client, a vector is used for representing a piece movement, and an attack distance of the piece is represented in the fine coordinate. The method can significantly decrease calculation times of the server and thus the computer game is more smooth.

BACKGROUND OF THE INVENTION

1. Field of Invention

The present invention relates to networked computer games and more particularly to an improved method of moving a piece in a networked computer game.

2. Related Art

Conventionally, in a three-dimensional computer game method of moving a piece is done by vector movement or square movement. Further, processing a piece collided with an obstacle is defined in order to facilitate piece movement in the computer game. However, such method was developed in the times when network technology was not mature (i.e., applicable to a single game machine only). Thus, a number of drawbacks have been found when such method applies in a networked computer game. For example, in the prior vector movement technique a piece's spherical coordinate is changed when it moves. Thus, a server has to calculate relative positions of a plurality of pieces involved again and broadcast latest locations of pieces to all clients. Such prior technique may adversely affect a normal calculation operation of the server when it applies in high load networked computer game such as Final Fantasy. To the worse, the server may malfunction due to overload. As for square movement, a unit of a spherical coordinate is a cube (i.e., similar to a square of checkerboard). A piece may move from one cube to another cube. This can decrease resolution in order to decrease calculation times (i.e., load) of the server. However, the piece has to move along cubes. Thus, its path is not smooth. Also, a piece may automatically align with checkerboard when it rotates. Hence, a minimum rotating angle of 45 degrees is required. Further, a piece may be distorted. Finally, as for processing a piece collided with an obstacle a model to model mode is implemented. That is, a three-dimensional model of a piece collides a three-dimensional model of an obstacle for determining whether the piece is able to pass the obstacle. The three-dimensional model is comprised of several thousand triangular bodies. A server may test each triangular body sequentially. The test is calculation intensive and time consuming. For example, more than one minute is required for a thousand times of test if a collision test takes 0.1 second. This inevitably may slow the processing speed of server and thus that of a networked computer game. Thus, a need for improvement exists.

SUMMARY OF THE INVENTION

It is therefore an object of the present invention to provide in a networked computer game played between a server and a client wherein at the server a checkerboard coordinate of low resolution and a fine coordinate of high resolution is used, and an object in a virtual three-dimensional space is represented in the checkerboard coordinate; at a three-dimensional piece of the computer game, both the checkerboard coordinate and the fine coordinate are used wherein an approximate location and blocking determination of the piece are represented and recorded by the checkerboard coordinate; and at the client, a vector is used for representing a piece movement, and an attack distance of the piece is represented in the fine coordinate, a method of moving the piece in the computer game, comprising (a) at the client receiving location data sent from the server; (b) initializing the piece to cause the piece to return to an initial point at start of the computer game or a previous stop point by employing the location data; (c) calculating a precise location based on direction and speed of the piece being moved; (d) locating a cube corresponding to the precise location; (e) determining whether the piece is allowed to enter the cube or not; (f) in response to the determination in the step (e) being positive moving the piece to the precise location; (g) at the client sending data about the precise location and the cube to the server; (h) determining whether the cube is legal or not; (i) in response to the determination in the step (h) being positive at the server sending data about the precise location to other clients; (j) in response to the determination in the step (e) being negative at the server moving the piece to a central point of a legal cube and informing the client to modify the precise location of the piece prior to looping back to the step (g); (k) in response to the determination in the step (e) being negative serving the cube as an obstacle cube; (I) causing the piece to move toward an X-axis direction along an edge of the obstacle cube and calculating a first new location after the movement; (m) determining whether the cube corresponding to the first new location is a cube that is allowed to enter or not; (n) in response to the determination in the step (m) being positive looping back to the step (f); (o) causing the piece to move toward an Y-axis direction along an edge of the obstacle cube and calculating a second new location after the movement; (p) determining whether the cube corresponding to the second new location is a cube that is allowed to enter or not; (q) in response to the determination in the step (p) being positive looping back to the step (f); and (r) in response to the determination in the step (p) being negative causing the piece to stop prior to looping back to the step (a). By utilizing the present invention, calculation times of the server is decreased significantly and thus the computer game is more smooth.

The above and other objects, features and advantages of the present invention will become apparent from the following detailed description taken with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart depicting a process for moving a piece in a networked computer game according to the invention; and

FIG. 2 depicts movement of a piece on a virtual checkerboard according to the invention.

DETAILED DESCRIPTION OF THE INVENTION

Referring to FIG. 1, a flowchart depicting a process for moving a piece in a networked three-dimensional computer game in accordance with a preferred embodiment of the invention is illustrated. A dual coordinate consisting of a checkerboard coordinate of low resolution and a fine coordinate of high resolution is implemented. At client, a vector is used for representing a piece movement. The fine coordinate is used for recording movement parameter. At server, both the checkerboard coordinate and the fine coordinate are used for improving performance. An object in a virtual three-dimensional space serves as an obstacle cube and is represented in the checkerboard coordinate. For a piece, both the checkerboard coordinate and the fine coordinate are used in which an approximate location and blocking determination of the piece are represented and recorded by the checkerboard coordinate. An attack distance of the piece is represented in the fine coordinate. Also, the client 1 interacts with the server 2.

The process begins at step A. At step B, a terminal at the client 1 receives location data from the server 2. At step C, initialize a piece to cause the piece to return to an initial point at start of a game or a previous stop point by employing the location data. At step D, calculate a precise location P based on direction and speed of a piece moving in a virtual three-dimensional space by running a game program. At step E locate a cube B corresponding to the location P. At step F, it is determined whether the piece can enter the cube B or not. The game program will take an action in response to the determination. In a case of the piece allowed to enter the cube B, the piece moves to the location P (step G). Next at step H, the terminal at the client 1 sends data about the location P and the cube B to the server 2. At step 1, the server 2 receives data about the location P and the cube B sent from the client 1. At step J, it is determined whether the cube B is a legal cube. If yes (i.e., the cube B is a legal cube), the server 2 sends data about the location P to other clients (step K). Otherwise (i.e., the cube B is not a legal cube), the server 2 moves the piece to a central point of a legal cube and then informs the client 1 to modify location of the piece (step L). Thereafter, process loops back to step I for receiving data about the location P and the cube B sent from the client 1.

Referring to FIG. 2 in conjunction with FIG. 1, in another case of the piece not allowed to enter the cube B as determined in step F (i.e., cube B is an obstacle cube α), the piece, β moves toward X-axis direction along edge of the obstacle cube α and then calculates a new location P1 after the movement (step M). At step N, it is determined whether the cube B1 corresponding to the new location P1 is a cube that is allowed to enter. If yes, the process loops back to step G. Otherwise, the piece β moves toward Y-axis direction along edge of the obstacle cube a and then calculates a new location P2 after the movement (step O). At step P, it is determined whether the cube B2 corresponding to the new location P2 is a cube that is allowed to enter. If yes, the process loops back to step G. Otherwise, the piece β stops movement (step Q) prior to looping back to step B.

While the invention herein disclosed has been described by means of specific embodiments, numerous modifications and variations could be made thereto by those skilled in the art without departing from the scope and spirit of the invention set forth in the claims. 

1. In a networked computer game played between a server and a client wherein at the server a checkerboard coordinate of low resolution and a fine coordinate of high resolution is used, and an object in a virtual three-dimensional space is represented in the checkerboard coordinate; at a three-dimensional piece of the computer game, both the checkerboard coordinate and the fine coordinate are used wherein an approximate location and blocking determination of the piece are represented and recorded by the checkerboard coordinate; and at the client, a vector is used for representing a piece movement, and an attack distance of the piece is represented in the fine coordinate, a method of moving the piece in the computer game, comprising: (a) at the client receiving location data sent from the server; (b) initializing the piece to cause the piece to return to an initial point at start of the computer game or a previous stop point by employing the location data; (c) calculating a precise location based on direction and speed of the piece being moved; (d) locating a cube corresponding to the precise location; (e) determining whether the piece is allowed to enter the cube or not; (f) in response to the determination in the step (e) being positive moving the piece to the precise location; (g) at the client sending data about the precise location and the cube to the server; (h) determining whether the cube is legal or not; (i) in response to the determination in the step (h) being positive at the server sending data about the precise location to other clients; (j) in response to the determination in the step (e) being negative at the server moving the piece to a central point of a legal cube and informing the client to modify the precise location of the piece prior to looping back to the step (g); (k) in response to the determination in the step (e) being negative serving the cube as an obstacle cube; (I) causing the piece to move toward an X-axis direction along an edge of the obstacle cube and calculating a first new location after the movement; (m) determining whether the cube corresponding to the first new location is a cube that is allowed to enter or not; (n) in response to the determination in the step (m) being positive looping back to the step (f); (o) causing the piece to move toward an Y-axis direction along an edge of the obstacle cube and calculating a second new location after the movement; (p) determining whether the cube corresponding to the second new location is a cube that is allowed to enter or not; (q) in response to the determination in the step (p) being positive looping back to the step (f); and (r) in response to the determination in the step (p) being negative causing the piece to stop prior to looping back to the step (a). 